import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
	routes: [

		{
			path: '/',
			redirect: '/home', //com_home  dashboard
			meta: {
				requireAuth: true
			}
		},
		{
			path: '/login',
			component: () => import( /* webpackChunkName: "home" */ '../views/page_c/loginEP.vue'),
			meta: {
				requireAuth: true
			}
		},
		{
			path: '/loginem',
			component: () => import( /* webpackChunkName: "home" */ '../views/page_c/login.vue'),
			meta: {
				requireAuth: true
			}
		}, {
			path: '/demo/help_document',
			component: () => import( /* webpackChunkName: "home" */
				'../views/page_c/help_document.vue'),
			meta: {
				requireAuth: true
			}
		}, {
			path: '/home',
			component: () => import( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
			meta: {
				title: '自述文件',
				requireAuth: true
			},
			children: [{
					path: '/demo/index',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/index.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/goods',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/goods.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/mygoods',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/mygoods.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/myorder',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/myorder.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/rewards',
					component: () => import( /* webpackChunkName: "home" */
						'../views/demo/rewards.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/my',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/my.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/work',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/work_order.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/mb_goods_details',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/mb_goods_details.vue'),
					meta: {
						requireAuth: true
					}
				},


				{
					path: '/demo/userchat',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/userchat.vue'),
					meta: {
						requireAuth: true
					}
				}, {
					path: '/demo/goods_2',
					component: () => import( /* webpackChunkName: "home" */
						'../views/page_c/goods_next.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/controll',
					component: () => import(
						'../views/page_c/controll/controll.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/elasticity',
					component: () => import(
						'../views/page_c/controll/elasticity.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/backups',
					component: () => import(
						'../views/page_c/controll/backups.vue'),
					meta: {
						requireAuth: true
					}
				}, {
					path: '/demo/nat',
					component: () => import(
						'../views/page_c/controll/nat.vue'),
					meta: {
						requireAuth: true
					}
				}, {
					path: '/demo/firewall',
					component: () => import(
						'../views/page_c/controll/firewall.vue'),
					meta: {
						requireAuth: true
					}
				}, {
					path: '/demo/system',
					component: () => import(
						'../views/page_c/controll/system.vue'),
					meta: {
						requireAuth: true
					}
				}, {
					path: '/demo/renew',
					component: () => import(
						'../views/page_c/controll/renew.vue'),
					meta: {
						requireAuth: true
					}
				},
				{
					path: '/demo/mygoods',
					component: () => import(
						'../views/page_c/mygoods.vue'),
					meta: {
						requireAuth: true
					}
				}

			]
		},
		{
			path: "/loginEP",
			component: () => import('../views/page_c/loginEP.vue')
		},
		{
			path: "/loginForget",
			component: () => import('../views/page_c/loginForget.vue')
		},
		{
			path: "/login2",
			component: () => import('../views/page_w/login02.vue')
		}
	]

})